<!DOCTYPE html>
<html ng-app>

<head>
    <title>一个绑定页面元素的angular程序</title>
    <script type="text/javascript" scr="../AngularJS实战示例/Script/angular.min.js"></script>
</head>

<body>
    <h3>请在下列文本框中输入任意内容</h3>
    <div ng-controller="usercontroller">
        <input id="Text1" type="text" ng-model="user.name" />
        <div>{{user.name}}</div>
    </div>
    <script type="text/javascript">
        function usercontroller($scope) {
            $scope.user = { name: "" };
        }
    </script>
</body>

</html>


